package com.resume.controller;

import com.resume.bean.PageBean;
import com.resume.domain.City;
import com.resume.domain.CityQuery;
import com.resume.enums.ExceptionEnum;
import com.resume.ex.ResumeException;
import com.resume.service.CityService;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: 梁云亮
 * @Date: 2021/7/19 20:29
 * @Describe:
 */
@Controller
@RequestMapping("/city")
public class CityController {
    @Resource
    private CityService cityService;

    //查询出所有已经开通的城市
    //查询出所有未开通的城市
    //查询出指定省下辖的所有未开通的城市
    //查询出指定省下辖的所有已经开通的城市
    @ApiOperation(value = "根据条件查询城市信息", notes = "根据条件查询城市信息")
    @GetMapping("/v1/listCity")
    public String list(CityQuery cityQuery,Model model) {
        PageBean<City> pageBean = cityService.pageCity(cityQuery);
        model.addAttribute("data",pageBean);
        return "city";
    }


    //更新城市信息

}
